import Axios from '@/utils/request';

/**
 * 系统访问走势
 */
export function queryUserBehaviorTrend(data: any, operateType?: string) {
    // return Axios.post('/userBehavior/trend', data);
    return Axios({ url: '/userBehavior/trend', method: 'post', data: data, headers: { operateType: operateType } });
}

/**
 * 日均访问流量
 */
export function queryUserBehaviorDailyTrend(data: any, operateType?: string) {
    // return Axios.post('/userBehavior/dailyTrend', data);
    return Axios({ url: '/userBehavior/dailyTrend', method: 'post', data: data, headers: { operateType: operateType } });
}

/**
 * 菜单访问流量
 */
export function queryUserBehaviorMenuTrend(data: any, operateType?: string) {
    // return Axios.post('/userBehavior/menuTrend', data);
    return Axios({ url: '/userBehavior/menuTrend', method: 'post', data: data, headers: { operateType: operateType } });
}

/**
 * 用户访问流量
 */
export function queryUserBehaviorUserTrend(data: any, operateType?: string) {
    // return Axios.post('/userBehavior/userTrend', data);
    return Axios({ url: '/userBehavior/userTrend', method: 'post', data: data, headers: { operateType: operateType } });
}

/**
 * 系统访问详情-日志
 */
export function queryUserBehaviorTrendDetail(data: any) {
    return Axios.post('/userBehavior/trend/detail', data);
}

/**
 * 导出日志
 */
export function queryUserBehaviorTrendExport(data: any) {
    return Axios.post('/userBehavior/trend/export', data);
}

/**
 * 导出日志
 */
export function queryUserBehaviorSystemLogExport(data: any) {
    return Axios.post('/userBehavior/systemLog/export', data);
}

/**
 * 菜单表下拉选择
 */
export function getUserBehaviorMenuSelect(): Promise<any> {
    return Axios.get('/userBehavior/menu/select');
}

/**
 * 菜单表下拉选择
 */
export function queryUserBehaviorMenuSelectByRequest(data: any): Promise<any> {
    return Axios.post('/userBehavior/menu/selectByRequest', data);
}
